﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="true" CodeFile="frmProductsAddModify.aspx.cs" Inherits="Admin_frmProductsAddModify" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    
    <div class="headerCell">
        <asp:Label id="lblAddModify" runat="server"></asp:Label> 
    </div>
    
    <b class="spacer"></b>
    
    <div class="contactForm1">
        
        <div id="reqContainerDiv" runat="server" visible="false">
            <div class="reqHeaderDiv">PLEASE ENTER VALUES FOR THE REQUIRED FIELDS BELOW</div>
            <div class="reqItemDiv">
                <ul class="reqList">
                    <li id="reqFirstName" runat="server" style="display:none"><img src="images/bullet.png" class="bullett" alt="" title=""  />Products Name is required.</li>
                    <li id="reqSurname" runat="server" style="display:none"><img src="images/bullet.png" class="bullett" alt="" title=""  />Short Description is required.</li>
                    <li id="reqEmail" runat="server" style="display:none"><img src="images/bullet.png" class="bullett" alt="" title=""  />Full Description is required.</li>
                    <li id="reqPassword" runat="server" style="display:none"><img src="images/bullet.png" class="bullett" alt="" title=""  />Price is required.</li>
                    <li id="reqPathToImage" runat="server" style="display:none"><img src="images/bullet.png" class="bullett" alt="" title=""  /><asp:Label ID="lblImagesError" runat="server" Text=""/></li>
                </ul>
            </div>
            <b class="spacer"></b>
        </div>
        
        <div class="contactFormLabel"><span class="mandatory">*</span>&nbsp;Product Category:</div>
        <div class="contactFormField">
            <asp:DropDownList ID="lstCategory" runat="server" CssClass="lstBox"></asp:DropDownList>
        </div>                    
        
        <b class="spacer"></b> 

        <div class="contactFormLabel"><span class="mandatory">*</span>&nbsp;Products Name:</div>
        <div class="contactFormField">
            <asp:TextBox ID="txtProductName" runat="server" CssClass="textBox" onKeyUp="return SetMaxLength(this,50)" />
        </div>
        
        <b class="spacer"></b>

        <div class="contactFormLabel"><span class="mandatory">*</span>&nbsp;Short Description:</div>
        <div class="contactFormField">
            <asp:TextBox ID="txtShortDescription" runat="server" TextMode="MultiLine" Rows="4" CssClass="textBox" onKeyUp="return SetMaxLength(this,50)" />
        </div>
        
        <b class="spacer"></b>                
        
        <div class="contactFormLabel"><span class="mandatory">*</span>&nbsp;Full Description:</div>
        <div class="contactFormField">
            <asp:TextBox ID="txtFullDescription" runat="server" TextMode="MultiLine" Rows="8" CssClass="textBox" onKeyUp="return SetMaxLength(this,450)" />
        </div>                    
        
        <b class="spacer"></b>        
        
        <div class="contactFormLabel"><span class="mandatory">*</span>&nbsp;Price:</div>
        <div class="contactFormField">
            <asp:TextBox ID="txtPrice" runat="server" CssClass="textBox" onKeyUp="return SetMaxLength(this,250)" />
        </div>                    
        
        <b class="spacer"></b>  

        <div class="contactFormLabel"><span class="mandatory">*</span>&nbsp;Products in Stock:</div>
        <div class="contactFormField">
            <asp:TextBox ID="txtProductsInStock" runat="server" CssClass="textBox" onKeyUp="return SetMaxLength(this,25)" />
        </div>                    
        
        <b class="spacer"></b>  

        <div class="contactFormLabel"><span class="mandatory">*</span>&nbsp;Images:</div>
        <div class="contactFormField">
            <asp:FileUpload ID="FIleUpload" runat="server" CssClass="textBox" Width="356px" style="float: left;" />
            <asp:ImageButton ID="btnUpload" runat="server" ImageUrl="~/admin/images/btnGalleryUploadImage.png" AlternateText="Upload" OnClick="btnUpload_Click" CssClass="btnUpload" style="margin-left: 5px;" />
            <br />
            <asp:Label ID="lblUniquePath" runat="Server" Visible="false"></asp:Label>
            <br />
            <asp:UpdatePanel ID="udpImages" runat="server" ChildrenAsTriggers="true">
                <ContentTemplate>
                     <asp:DataList ID="dlImages" runat="server" RepeatColumns="3" ItemStyle-CssClass="listImages">
                         <ItemStyle CssClass="listImages" />
                        <ItemTemplate>
                            <table cellspacing="5">
                                <%# Container.DataItem %>            
                            </table>
                            <div align="center" style="padding-top: 5px;">
                                <asp:RadioButton ID="rdbMainImage" runat="server" GroupName="MainImage" Text="Main Image" onclick="javascript:CheckOnOff(this.id,'dlImages');" /><br />
                            </div>
                       </ItemTemplate>
                    </asp:DataList>
                </ContentTemplate>
            </asp:UpdatePanel>
            <br />
            <b><asp:Label ID="lblUploadError" runat="server" CssClass="error"></asp:Label></b> 
        </div>
        
        <div class="buttons">
            <asp:ImageButton ID="btnBack" ImageUrl="images/btnBack.png" AlternateText="Go Back " runat="server" OnClick="btnBack_Click" />
            <asp:ImageButton ID="btnSave" ImageUrl="images/btnSave.png" AlternateText="Save Item " runat="server" OnClick="btnSave_Click" />
            <asp:ImageButton ID="btnClear" ImageUrl="images/btnClear.png" AlternateText="Clear Item " runat="server" OnClick="btnClear_Click" />
        </div>
        <br />
        <br />
        <br />
        <br />                       
    </div>
</asp:Content>

